<?php

class Application_Form_Visiteur extends Zend_Form {

    public function init() {
        $this->setName('visiteur');

        $id = new Zend_Form_Element_text('id');
        $id->setLabel('Identifiant')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEmpty');
        $nom = new Zend_Form_Element_text('nom');
        $nom->setLabel('Nom')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEmpty');
        $prenom = new Zend_Form_Element_text('prenom');
        $prenom->setLabel('Prenom')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEmpty');
        $login = new Zend_Form_Element_text('login');
        $login->setLabel('Login')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEmpty');
        $mdp = new Zend_Form_Element_text('mdp');
        $mdp->setLabel('Mot de Passe')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEmpty');
       $adresse = new Zend_Form_Element_text('adresse');
       $adresse->setLabel('Adresse')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addValidator('NotEmpty');      
        $cp = new Zend_Form_Element_text('cp');
        $cp->setLabel('Code Postal')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEmpty');
        $ville = new Zend_Form_Element_text('ville');
        $ville->setLabel('Ville')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEmpty');
        $dateE = new Zend_Form_Element_text('dateE');
        $dateE->setLabel('Date d\'embauche')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEmpty');
        $envoyer = new Zend_Form_Element_Submit('envoyer');
        $envoyer->setAttrib('id','bouttonenvoyer');
        
        $this->addElements(array($id,$nom,$prenom,$adresse,$cp,$dateE,$login,$mdp,$ville,$envoyer));
    }

}

